<?php
/**
 * Organization Access admin page. Used in admin action in OrganizationAccessController.
 *
 * @package   views
 * @subpackage organizationAccess
 * @since     1.0
 * @filesource
 */

$this->breadcrumbs=array(
	'Users'=>array('user/admin'),
	$model->user->username=>array('user/update','id'=>$model->user->id),
	'Organization Accesses',
);

$this->menu=array(
	array('label'=>'Create Organization Access', 'url'=>array('create','userId'=>$model->userId)),
);
?>

<h1>Organization Accesses</h1>

<p>
You may optionally enter a comparison operator (<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>&lt;&gt;</b>
or <b>=</b>) at the beginning of each of your search values to specify how the comparison should be done.
</p>

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'organization-access-grid',
	'dataProvider'=>$model->search($model->userId),
	'filter'=>$model,
	'columns'=>array(
		array(
			'name'=>'organizationId',
			'value'=>'$data->organization->name',
			'filter'=>CHtml::listData(Organization::model()->findAll(), 'id', 'name'),
		),
		array(
			'name'=>'accessCreate',
			'type'=>'boolean',
			'header'=>'Create',
			'filter'=>DataUtil::getOptionYesNo(),
		),
		array(
			'name'=>'accessView',
			'type'=>'boolean',
			'header'=>'View',
			'filter'=>DataUtil::getOptionYesNo(),
		
		),
		array(
			'name'=>'accessDownload',
			'type'=>'boolean',
			'header'=>'Download',
			'filter'=>DataUtil::getOptionYesNo(),
		
		),
		array(
			'name'=>'accessUpdate',
			'type'=>'boolean',
			'header'=>'Update',
			'filter'=>DataUtil::getOptionYesNo(),
		
		),
		array(
			'name'=>'accessDelete',
			'type'=>'boolean',
			'header'=>'Delete',
			'filter'=>DataUtil::getOptionYesNo(),
		
		),
		array(
			'class'=>'CButtonColumn',
			'template'=>'{update} {delete}',
		),
	),
)); ?>
